package com.example.demo.controller;

import com.example.demo.model.Result;
import com.example.demo.service.ParamsService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/par")
@AllArgsConstructor
public class ParamsController {

    private ParamsService paramsService;

    @GetMapping("/{id}")
    public Result getParams(@PathVariable("id") Integer id) {
        return paramsService.getParamsByproductId(id);
    }
}
